import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    history:["回力"],//搜索历史
  },
  mutations: {
    addhistory(state,item){
      console.log(item);
      let index = this.state.history.findIndex(test => {
       return test == item
      })
      if(index == -1){
        this.state.history.push(item);
      }
    }
  },
  actions: {
  },
  modules: {
  }
})
